Next: Replacing text across multiple files, Previous: Forcing Emacs to iconify itself, Up: Common requests
see Regexp Backslash.
The or operator is ‘\|’, not ‘|’, and the grouping operators are
‘\(’ and
‘\)’. Also,
the string syntax for a backslash is ‘\\’. To specify a regular expression
like ‘xxx\(foo\|bar\)’ in a Lisp string, use
‘xxx\\(foo\\|bar\\)’.
Note the doubled backslashes!